//
//  GrantBillListCell.m
//  FactorySale
//
//  Created by 主事丫环HU on 2020/7/25.
//  Copyright © 2020 主事丫环. All rights reserved.
//

#import "GrantBillListCell.h"
@interface GrantBillListCell()

@property (weak, nonatomic) IBOutlet UILabel *orderNumberLabel;
@property (weak, nonatomic) IBOutlet UILabel *partsNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *moneyLabel;
@property (weak, nonatomic) IBOutlet UILabel *reasonLabel;

@end
@implementation GrantBillListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
+ (instancetype)cellWithTableView:(UITableView *)tableView {
    
    static NSString *ID = @"GrantBillListCell";
    
    GrantBillListCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        
        cell = [NSBundle.mainBundle loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil].firstObject;
    }
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    return cell;
}
- (void)setModel:(GrantListContentModel *)model{
    self.orderNumberLabel.text = [NSString stringWithFormat:@"订单编号：%@",model.id];
    self.partsNameLabel.text = model.parts_name;
    self.timeLabel.text = model.createTime;
    self.moneyLabel.text = [NSString stringWithFormat:@"¥%@",model.compensationPrice];
    self.reasonLabel.text = model.faultDetails;
    if ([model.transfer isEqualToString:@"1"]) {//未发放
        self.IssueNowButton.hidden = NO;
    } else {
        self.IssueNowButton.hidden = YES;
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
